oxenstored: allow self-conflicts
authorThomas Sanders <thomas.sanders@citrix.com>
Thu, 23 Mar 2017 19:06:54 +0000 (19:06 +0000)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Wed, 5 Apr 2017 14:10:42 +0000 (15:10 +0100)
commitcb778dee017504505a5f20aea1831abef31a3e97
treede3152cdd51a155a7a471afe49f4f6376e64df98
parentfa0b2b9555366e5836a5fdacb62bb054cdefc3d6
oxenstored: allow self-conflicts

We already avoid inter-domain conflicts but now allow intra-domain
conflicts.  Although there are no known practical examples of a domain
that might perform operations that conflict with its own transactions,
this is conceivable, so here we avoid changing those semantics
unnecessarily.

When a transaction commit fails with a conflict and we look through
the history of commits to see which connection(s) to blame, ignore
historical commits that were made by the same connection as the
failing commit.

Reported-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Thomas Sanders <thomas.sanders@citrix.com>
Reviewed-by: Jonathan Davies <jonathan.davies@citrix.com>
tools/ocaml/xenstored/history.ml
tools/ocaml/xenstored/process.ml